import AdSelect from '@/components/AdSelect';
export const codes = {
  select: 'ANNUALAUDITSELECT',
  showDetail: 'ANNUALAUDITSELECT_VIEW',
  add: 'ANNUALAUDITSELECT_ADD',
  edit: 'ANNUALAUDITSELECT_UPA',
  page: 'VERIFICATIONPAGE',
  bill: 'VERIFICATIONSELECT',
  delete: 'ANNUALAUDITSELECT_DELETE',
  import: 'ANNUALAUDIT_IMPORT',
};

export const allDispatchType = {
  delete: 'verification/delPapers',
};

export function renderTableAdSelect({ key, data, value, props }) {
  let params = { onlyRead: true, value };
  if (key) {
    const { dictObject } = props;
    params = { data: dictObject[key], payload: { code: [key] }, ...params };
  } else {
    params = { data, ...params };
  }
  return <AdSelect {...params} />;
}
